<%@ page language="java"  pageEncoding="utf-8"%>
<%@ page import="java.util.* %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <script src='http://codepen.io/assets/libs/fullpage/jquery.js'></script>
<script src="js/index.js"></script>
<script src="/gg_bd_ad_720x90.js" type="text/javascript"></script>
<script src="/follow.js" type="text/javascript"></script>
<head>
<base href="<%=request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getContextPath()+"/" %>"/>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0"> 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
 <meta name="viewport" content="width=device-width, initial-scale=1">
	<!-- Iconos -->
	<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">

    <link rel="stylesheet" href="css/style.css" media="screen" type="text/css" />
    <style type="text/css">
    body,td,th {
	font-family: "Open Sans", Arial, Helvetica, Sans-serif, Verdana, Tahoma;
	color: #5A7EB4;
}
    </style>
    <script language="javascript" type="text/javascript" >  
  
function emailCheck(obj, labelName) {  
    var objName = eval("document.all."+obj);  
    var pattern = /^([\.a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/;  
    if (!pattern.test(objName.value)) {  
        alert("请输入正确的邮箱地址。");  
        objName.focus();  
        return false;  
    }  
    return true;  
}
</script>  
<!--<script type="text/javascript" src=""></script>/<link href="" type="text/css" rel="stylesheet" />/-->
</head>
<body>


<div id="index" ></div>
   <%
       String name=(String)session.getAttribute("username"); 
       /*  List<User> name=(List<User>)session.getAttribute("users");  */
        if(name==null||name.equals("")){
        response.sendRedirect("userlogin.jsp");
        }
     %>
    
<div class="b1"><strong>留言板</strong></div>
<hr> 
<center> 
<form action=savememo.jsp method=get> 
<table border=3 width="300" height="260"> 
<tr> 
<td>姓名:</td> 
<td>
<input type=text size=20 name="name" value="<%=name%>" />
</td> 
</tr> 
<tr> 
<td>性别</td> 
<td>男<input type=radio name=sex value=boy checked>
           女 <input type=radio name=sex value=girl checked>
  
</td> 
</tr> 
<tr> 
<td>Email:</td> 
<td><input type=text size=40 name="email" maxlength="30" onblur="return emailCheck('email', 'email')"></td> 
</tr> 
<tr> 
<td>主题：</td> 
<td><input type=text size=60 name="subject"onkeyup="value=value.replace(/[^\u4E00-\u9FA5]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\u4E00-\u9FA5]/g,''))" maxlength="15"/> <!-- 只能输入汉字 -->
</td> 
</tr> 
<tr> 
<td>留言:</td> 
<td><textarea name="memo" rows=4 cols=60 maxlength="200"></textarea></td> 
</tr> 
<tr align=center><td colspan=3><input type=submit method=send value=留言> 
<input type=reset value=重新输入></td> 

</tr> 
</table> 
</form> 
<hr> 
<center> 
<a href=opendata.jsp>管理留言</a> 
<a href=showall.jsp>查看留言</a> 
</center>
</center> 
  </body>
</html>
